package org.realogic.cfm.plugin;

import java.io.File;
import java.util.Properties;

/**
 * 
 * 插件定义
 * 
 */
public class PluginDefinition {

	private Properties pluginProperties = new Properties();

	private String id;

	private String name;

	private File pluginFoler;

	// 插件对象实例
	private Plugin pluginInstance;

	private boolean isSupportCluster = true;

	public PluginDefinition() {

	}

	public File getPluginFoler() {
		return this.pluginFoler;
	}

	public void setPluginFoler(File pluginFoler) {
		this.pluginFoler = pluginFoler;
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public final String getPluginProperty(String key) {
		return this.pluginProperties.getProperty(key);
	}

	public final void setPluginProperties(Properties props) {
		this.pluginProperties = props;
	}

	public Plugin getPluginInstance() {
		return pluginInstance;
	}

	public void setPluginInstance(Plugin pluginInstance) {
		this.pluginInstance = pluginInstance;
	}

	public boolean isSupportCluster() {
		return this.isSupportCluster;
	}

	public void setSupportCluster(boolean isSupportCluster) {
		this.isSupportCluster = isSupportCluster;
	}

	public String toString() {
		return "【标识: " + getId() + ", 名称:" + getName() + "】";
	}
}